﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Pregled_hoteli.aspx.cs" Inherits="Pregled_hoteli" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server" style=" background-image:url('monopoly.png'); height: 895px; width: 895px; text-align: center;">
    <div>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/Hoteli.mdb" 
            SelectCommand="SELECT * FROM [Hotel] ORDER BY [ID_Grad]"></asp:AccessDataSource>
            <asp:GridView ID="GridView1" runat="server" CellPadding="4" 
            ForeColor="#333333" DataSourceID="SqlDataSource1"
        GridLines="None" AutoGenerateColumns="False" DataKeyNames="ID_Grad" 
            EnableModelValidation="True">
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
            
            <asp:BoundField DataField="ime" HeaderText="ime" 
                SortExpression="ime" />
            <asp:BoundField DataField="kategorija" HeaderText="kategorija" 
                SortExpression="kategorija" />
            <asp:BoundField DataField="ID_Grad" HeaderText="ID_Grad" 
                SortExpression="ID_Grad" />
            <asp:BoundField DataField="Cena_za_kupuvanje" HeaderText="Cena_za_kupuvanje" 
                SortExpression="Cena_za_kupuvanje" />
            <asp:BoundField DataField="Cena_za_poseta" HeaderText="Cena_za_poseta" 
                SortExpression="Cena_za_poseta" />
          
        </Columns>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Gjorgji\Desktop\WebSite1\App_Data\Hoteli.mdb;"  
            ProviderName="System.Data.OleDb" 
            SelectCommand="SELECT ID_Hotel, ime, kategorija, ID_Grad, Cena_za_kupuvanje, Cena_za_poseta  FROM [Hotel]"
            UpdateCommand="UPDATE Hotel SET ime=@ime, kategorija=@kategorija, Cena_za_kupuvanje=@Cena_za_kupuvanje, Cena_za_poseta=@Cena_za_poseta WHERE(ID_Hotel = @ID_Hotel)"
            DeleteCommand="DELETE from Hotel WHERE ID_Hotel=@ID_Hotel"
            >
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
